home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 71 / MOBICLIC 71.ISO / mac / DATA / COMMUN / temp0001 / 00214_Script_GESTION_FLASH_AUDIO_DIRECTOR < prev    next >
Text File  |  2004-12-05  |  4KB  |  88 lines

  1. global gze_Label
  2. property p_cettePiste, p_Nodepiste,p_SWF,pEscape,pdeclencheur,pnomSon,p_aiguillage, pNopisteSon,p_start
  3. property  pNbFrames
  4. ----------------------------------
  5. on getPropertyDescriptionList me
  6.   return [\
  7. #pdeclencheur:[#comment:"Θchappement α la fin du :",#format:#string,#range:["SON","SWF","Le plus long"],#default: "Le plus long"],\
  8. #pnomSon:[#comment:"nom du son α jouer:",#format:#string,#default: EMPTY],\
  9. #pNopisteSon:[#comment:"No piste son:",#format:#integer,#range:[2,3,4,5,6,7,8],#default: 3],\
  10. #p_aiguillage:[#comment:"branchement α la sortie :",#format:#string,#range:["frame suivante","marker suivant"],#default: "frame suivante"]\
  11.   ]
  12. end
  13. ----------------------------------------
  14. on beginsprite me
  15.   p_Nodepiste = me.spriteNum
  16.   p_cettePiste = sprite(p_Nodepiste)
  17.   p_SWF = p_cettePiste.member
  18.   p_start = the frame
  19.   pEscape = p_cettePiste.endFrame
  20.   pNbFrames = p_SWF.framecount
  21.   gze_Label = the frameLabel
  22. end
  23. ----------------------------------- 
  24. on exitFrame me
  25.   the soundKeepDevice = 0
  26.   if  the frame = p_start then----------------sur la premiΦre frame du swf
  27.     if pnomSon <> EMPTY then
  28.       joueSon(pnomSon,pNopisteSon)------------------on lance le son choisi sur la piste choisie
  29.     end if
  30.   else
  31.     if the mouseDown then
  32.       coupeson(pNopisteSon)
  33.       niveauSon()
  34.       aiguillage(p_aiguillage)----------------------------------on sort de la boucle
  35.     end if
  36.     if the frame = pEscape then----------------sur la derniΦre frame du swf
  37.       case(pdeclencheur) of
  38.         "SON":-------------------------------------si l'Θchappement se fait α la fin du son
  39.           if not(soundBusy(pNopisteSon)) then----------------si le son s'arrΩte
  40.             niveauSon()
  41.             aiguillage(p_aiguillage)---------------on sort de la boucle
  42.           else
  43.             go the frame---------------------------sinon on continue α boucler
  44.           end if
  45.         "SWF":-------------------------------------si l'Θchappement se fait α la fin du swf
  46.           if p_cettePiste.frame =  pNbFrames then----------------si le swf est arrivΘ α son terme
  47.             coupeson(pNopisteSon)
  48.             niveauSon()
  49.             aiguillage(p_aiguillage)---------------on sort de la boucle
  50.           else
  51.             go the frame---------------------------sinon on continue α boucler
  52.           end if
  53.         "Le plus long":-------------------------------------si l'Θchappement est calΘ sur le mΘdia le plus long
  54.           if not(soundBusy(pNopisteSon)) then----------------si le son s'arrΩte
  55.             if p_cettePiste.frame =  pNbFrames then----------------et si le swf est arrivΘ α son terme
  56.               aiguillage(p_aiguillage)----------------------------------on sort de la boucle
  57.             else
  58.               go the frame---------------------------sinon on continue α boucler
  59.             end if
  60.           else-----------------------------------------------si le swf est arrivΘ α son terme
  61.             if not(soundBusy(pNopisteSon)) then----------------si le son s'arrΩte
  62.               niveauSon()
  63.               aiguillage(p_aiguillage)----------------------------------on sort de la boucle
  64.             else
  65.               go the frame---------------------------sinon on continue α boucler
  66.             end if
  67.           end if
  68.       end case
  69.     end if
  70.   end if
  71. end
  72. ---------------------------------------
  73. on aiguillage ZUT
  74.   case(ZUT) of
  75.     "frame suivante":------------------------------branchement α la frame suivante
  76.       go the frame +1
  77.     "marker suivant":------------------------------branchement au marker suivant
  78.       go marker(+1)
  79.   end case
  80. end
  81. ------------------------------------
  82. on mouseUp
  83.   coupeson(pNopisteSon)
  84.   niveauSon()
  85.   aiguillage(p_aiguillage)----------------------------------on sort de la boucle
  86. end
  87. ------------
  88.